#pragma once

namespace zeroplus::mq
{
    namespace BrokerState
    {
        static int MASTER = 0;
        static int SLAVE = 1;
    }

// 相对于broker的server套接字的偏移量
#define PUSHMODE 1
#define PULLMODE 2

    namespace NetworkFrequency // 毫秒级
    {
        // 路由注册频率
        static int registerRouteInfoFrequency = 30000;
        // 路由查询频率
        static int queryRouteInfoFrequency = 7000;
        // 客户端接收消息超时时间
        static int recvTimeout = 10000;
        // 发布消息频率
        static int pubMsgFrequency = 1000;
        // 订阅消息频率
        static int subMsgFrequency = 1000;
        // 定时任务查找频率
        static int delayTaskSearchFrequency = 5000;
    }

    namespace MessageFeature
    {
        static uint32_t defaultQueueSize = 1024 * 1024 * 5;
        static uint32_t maxMessageSize = 128 * 1048;
    }

    enum MessageStatus
    {
        IsConsumer = 0,
        NoConsumer = 1
    };

}
